
<!DOCTYPE html>
<html class="client-nojs" lang="en" dir="ltr">
<head>
<meta charset="UTF-8"/>
<title>Tca correct - PanoTools.org Wiki</title>




<style media="screen" type="text/css" title="Screen style sheet"> @import url(manual.css); </style>

<meta name="generator" content="MediaWiki 1.35.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>





<!--[if lt IE 9]><![endif]-->
</head>
<body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Tca_correct rootpage-Tca_correct skin-vector action-view skin-vector-legacy">


<div id="content" class="mw-body" role="main">
	<a id="top"></a>
	
	
	<h1 id="firstHeading" class="firstHeading" lang="en">Tca correct</h1>
	<div id="bodyContent" class="mw-body-content">
		<div id="siteSub" class="noprint">From PanoTools.org Wiki</div>
		
		
		
		
		
		
		<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="mw-parser-output"><p><b>tca_correct</b> is a command-line tool shipped with <a href="Hugin.html" title="Hugin">hugin</a> that can be used to automatically calculate lens chromatic aberration<a class="external" href="https://wiki.panotools.org/TCA">[*]</a> correction parameters.  Ideal sample photos would have a lot of contrast over the entire image area, little saturated colour and no blown highlights.
</p>
<h2><a name="Using_with_fulla"><span class="mw-headline">Using with fulla</span></a></h2>
<p><a href="Fulla.html" title="Fulla">fulla</a> is a command-line tool for correcting <a href="Lens_distortion.html" title="Lens distortion">lens distortion</a>, <a href="Vignetting.html" title="Vignetting">vignetting</a> and TCA<a class="external" href="https://wiki.panotools.org/TCA">[*]</a> (chromatic aberration). It is capable of applying the full panotools polynomial to the red and blue channels, thereby correcting any transverse chromatic aberration.
</p><p>First calculate some TCA correction parameters for a sample image, notice that I'm only going to bother optimising <i>b</i> and <i>v</i> parameters in the <a href="Lens_correction_model.html" title="Lens correction model">lens correction model</a>, you might get better results with the full <i>abcv</i> set of parameters:
</p>
<pre> tca_correct -o bv DSC_3194.ppm
</pre>
<p>This outputs some fulla parameters like so:
</p>
<pre> -r 0.0000000:0.0001197:0.0000000:0.9997630 -b 0.0000000:-0.0001142:0.0000000:1.0001841
</pre>
<p>You can now use these with fulla when converting photos from this lens:
</p>
<pre> fulla -r 0.0:0.0001197:0.0:0.9997630 -b 0.0:-0.0001142:0.0:1.0001841 -o corrected.tif DSC_3194.ppm
</pre>
<h2><a name="Using_with_dcraw"><span class="mw-headline">Using with dcraw</span></a></h2>
<p>dcraw<a class="external" href="https://wiki.panotools.org/Dcraw">[*]</a> is a command-line <a href="RAW.html" title="RAW">RAW</a> converter with the ability to apply scaling of red/blue channels at the Bayer interpolation stage. Simple scaling is not as sophisticated as the panotools polynomial used in <a href="Fulla.html" title="Fulla">fulla</a> but is good enough for nearly all purposes. Start by extracting a test image from a RAW file:
</p>
<pre> dcraw DSC_3194.NEF
</pre>
<p>Then run <b>tca_correct</b> on this PPM image, but tell it to only optimise <i>v</i> field of view<a class="external" href="https://wiki.panotools.org/Field_of_view">[*]</a> for the red and blue channels:
</p>
<pre> tca_correct -o v DSC_3194.ppm
</pre>
<p>After a while some <a href="Fulla.html" title="Fulla">fulla</a> correction parameters will be outputted:
</p>
<pre> -r 0.0000000:0.0000000:0.0000000:1.0005943 -b 0.0000000:0.0000000:0.0000000:1.0008306
</pre>
<p>The two useful numbers (1.0005943 and 1.0008306) are the inverse of the numbers required by dcraw, so get a calculator and calculate the reciprocal of each:
</p>
<pre> 1 / 1.0005943 = 0.999406
 1 / 1.0008306 = 0.999170
</pre>
<p>Now when converting RAW files from this lens you can use the dcraw -C parameter to correct TCA<a class="external" href="https://wiki.panotools.org/TCA">[*]</a>:
</p>
<pre> dcraw -C 0.999406 0.999170 [OPTIONS...] DSC_3194.NEF
</pre>

<!--
Transclusion expansion time report (%,ms,calls,template)
100.00%    0.000      1 -total
-->


</div></div><div class="printfooter">Retrieved from "<a dir="ltr" href="https://wiki.panotools.org/index.php?title=Tca_correct&amp;oldid=11191">https://wiki.panotools.org/index.php?title=Tca_correct&amp;oldid=11191</a>"</div>
		</div></div></body></html>